.\"   $Id: delptype.3,v 1.1 2002/03/08 13:51:02 fred Exp $
.\" @(#)delptype.2 2.11 91/08/22 ; Labo masi cao-vlsi; Author : Frederic Petrot
.if t \{\
.so man1/alc_contents.mac
.XS \n%
.ti 0.2i
delptype
.XE
.XS4 \n%
.ti 0.2i
delptype
.XE4 \}
.TH DELPTYPE 3 "October 1, 1997" "ASIM/LIP6" "MBK UTILITY FUNCTIONS"
.SH NAME
delptype \- delete an element of a \fBptype_list\fP
.so man1/alc_origin.1
.SH SYNOPSIS
.nf
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
#include "mut.h"
ptype_list \(**delptype(pthead, type)
ptype_list \(**pthead;
long type;
.ft R
.fi
.SH PARAMETERS
.TP 20
\fIpthead\fP
Pointer to a \fBptype\fP list
.TP
\fItype\fP
The pointer of this type is to be deleted.
.SH DESCRIPTION
\fBdelptype\fP deletes the element of the \fBptype_list\fP that has the type
\fItype\fP in the list pointed to by \fIpthead\fP.
The list consistency is maintained, and the element put back in the list
of free blocks.
.SH RETURN VALUE
\fBdelptype\fP returns a pointer to the new head of list if a \fItype\fPd
pointer used to belong to the list. In most case, it has the value of
\fIpthead\fP. If the \fItype\fP doesn't belong to the list, \fBNULL\fP is
returned.
.SH ERROR
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
"\(**\(**\(** mbk error \(**\(**\(** delptype impossible : pthead = NULL"
.ft R
.RS
The pointer to the head of list is \fBNULL\fP, and that clear that
such a list can't be ran thru.
.RE
.SH EXAMPLE
.ta 3n 6n 9n 12n 15n 18n 21n
.nf
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
#include "mut.h"
#include "mph.h"
void delete_user(ptfig)
phfig_list \(**ptfig;
{
phins_list \(**i;
	for (i = ptfig\->PHINS; i; i = i\->NEXT) 
		i\->USER = delptype(i\->USER, PLACEABOX);
}
.ft R
.fi
.SH SEE ALSO
.BR mbk (1),
.BR ptype (3),
.BR addptype (3),
.BR getptype (3),
.BR freeptype (3).


.so man1/alc_bug_report.1

